﻿namespace net.zxteam.ZXLexer.Dynamic.Internal
{
    using net.zxteam.ZXLexer.Tokens;
    using System;
    using System.Diagnostics.Contracts;

    internal sealed class AstToken : Token, IAstToken
    {
        private readonly IToken _innerToken;

        internal AstToken(IToken innerToken)
        {
            Contract.Requires(innerToken != null);

            _innerToken = innerToken;
        }

        public IToken InnerToken { get { return _innerToken; } }

        protected override System.Collections.Generic.IEnumerable<IToken> GetChildren()
        {
            return new IToken[] { _innerToken };
        }
    }
}
